﻿namespace com.oakwoodsys.Extensions.SharePointExtensions
{
    using Microsoft.SharePoint;

    public static partial class SharePointExtensions
    {
        #region Methods

        public static bool IsFloatingPointNumber( this SPFieldType t )
        {
            if ( t == SPFieldType.Currency ||
                t == SPFieldType.Number )
                return true;
            else
                return false;
        }

        public static bool IsInteger( this SPFieldType t )
        {
            if ( t == SPFieldType.Counter ||
                t == SPFieldType.Integer )
                return true;
            else
                return false;
        }

        public static bool IsString( this SPFieldType t )
        {
            if ( t == SPFieldType.Note ||
               t == SPFieldType.Text ||
               t == SPFieldType.Choice ||
               t == SPFieldType.Lookup )
                return true;
            else
                return false;
        }

        #endregion Methods
    }
}